#include "stdafx.h"
#include "../Core/Main/Application.h"
#include "Control.h"

namespace ham
{
	Control::Control(Application* app)
		: Module(app)
	{
		setupUi(this);
		init(app);
	}

	Control::~Control(void)
	{
	}
		
	QString	Control::getModuleName() const
	{
		return "Control";
	}

	QString Control::getDisplayName() const
	{
		return "Transceiver Control";
	}

	bool Control::isInit() const
	{
		return true &&
			Module::isInit();
	}

	void Control::init(Application* app)
	{
	}
	
	QWidget* Control::getOptionsWdg(QWidget* parent) const
	{
		return new WdgControlOptions(parent);
	}
	
	QList<QMenu*> Control::getMenus(QWidget* parent) const
	{
		QList<QMenu*> menus;

		// add menu
		QMenu* menu = new QMenu(getModuleName(), parent);
		QAction* nothing = new QAction("No entries here", parent);
		menu->addAction(nothing);

		menus.push_back(menu);

		return menus;
	}

	QList<QPair<QString, QWidget*>> Control::getMainWidgets(QWidget* parent)
	{
		QList<QPair<QString, QWidget*>> mainWidgets;

		QPair<QString, QWidget*> wdgPair(getDisplayName(), this);
		mainWidgets.push_back(wdgPair);

		return mainWidgets;
	}
}